<!--
 * @Author: liuhanzhuang
 * @Date: 2023-01-04 16:42:21
 * @Description: 文件描述
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    li:nth-child(even) {
      background-color: red;
    }

    li:nth-child(odd) {
      background-color: green;
    }

    * {
      margin: 0;
      padding: 0;
    }

    li {
      position: absolute;
      list-style: none;
      width: 50px;
      height: 200px;
      background-color: aquamarine;
      transform-origin: bottom center;
      border-radius: 10px;
      box-shadow: 0 0 10px rgba(0, 0, 0, .3);
      transition: all 1s ease-out;
    }

    ul:hover li {
      transform: rotate(var(--x));
      opacity: 1;
    }

    li:not(:nth-child(7)) {
      opacity: 0;
    }

    ul {
      position: relative;
      margin: 300px;
    }
  </style>
</head>

<body>
  <ul>
    <li style="--x:-90deg">1</li>
    <li style="--x:-75deg">2</li>
    <li style="--x:-60deg">3</li>
    <li style="--x:-45deg">4</li>
    <li style="--x:-30deg">5</li>
    <li style="--x:-15deg">6</li>
    <li style="--x:0deg">7</li>
    <li style="--x:15deg">8</li>
    <li style="--x:30deg">9</li>
    <li style="--x:45deg">10</li>
    <li style="--x:60deg">11</li>
    <li style="--x:75deg">12</li>
    <li style="--x:90deg">13</li>
  </ul>
</body>

</html>